import service from "./request";

export function login() {
	service({
		method:'GET',
	})
}

// 调用微信login方法
export function wxLogin() {
	return new Promise((resolve,reject)=>{
		wx.login({
		  success (res) {
			  resolve(res)
		  },
		  fail(){
			  reject(res)
		  }
		})
	})
}

// 调用后台login
export function backLogin(params) {
	return service({
		method:"GET",
		url:"/login",
		params
	})
}

export function hello(){
	return service({
		method:"GET",
		url:'/hello'
	})
}

export function drawPic(data) {
	return service({
		method:"POST",
		url:'/picai',
		data
	})
}
export function getTextList(data) {
	return service({
		method:"GET",
		url:"/listTAll",
		data
	})
}

export function getPicList(data) {
	return service({
		method:"GET",
		url:"/listPAll",
		data
	})
}